#!/bin/bash

echoargs()
{
  # see http://stackoverflow.com/questions/6723426/looping-over-arrays-printing-both-index-and-value 
  #   ... you would find the array keys with "${!foo[@]}" ... 
  args=("$@")
  for i in "${!args[@]}"; do
    echo "\$$i=${args[$i]}"
  done
}

echo "\$* is:"
echoargs $*
echo

echo "\"\$*\" is:"
echoargs "$*"
echo

echo "\$@ is:"
echoargs $@
echo

echo "\"\$@\" is:"
echoargs "$@"
echo

snippet-receive-and-repass-quoted-args2 "$@"

